# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions


export PS1="\[\e[1;33m\]\u\[\e[0m\]\[\e[1;36m\]@\[\e[0m\]\[\e[1;33m\]\W\[\e[0m\]\[\e[1;32m\] >>> \[\e[0m\]"

export HISTCONTROL=ignoreboth
export HISRSIZE=5000
export HISTIGNORE="clear:bg:fg:cd:cd -:cd ..:exit:date:w:*  --help:ls:l:ll:lll"

export VIMRUNTIME='/home/lcy/soft/vim/runtime'


# aliases

# cd
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."

alias "cc"="cd /"

# ls
alias la="ls -a"
alias lla="ls -lah"
alias ll="ls -lh"

#git
alias gs="git status"
alias gi="git init"
alias gl="git log --all --graph --decorate"
alias gb="git branch"
alias ga="git add"
alias gr="git remote"

#tar
alias tarc="tar zcvf"
alias tarx="tar xvf"

alias rm="move2trash"

alias mv="mv -i"

#set the editor to vim
export EDITOR=vim
set -o vi

# functions

move2trash(){
    for file in "$@"; do
	mv $file /tmp/trash
    done
}

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/lcy/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/lcy/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/lcy/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/lcy/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

